package com.wgy.day21.Calendar类;

import java.util.Calendar;
import java.util.Date;

/**
 * Created by pc on 2020/11/19 22:21
 * Description: LearningJava
 */
public class Demo04Calendar {
    public static void main(String[] args) {

        //使用getInstance()方法获得 Calendar对象a --->使用默认时区和语言环境获得一个当前时间日历
        Calendar a = Calendar.getInstance();
        //把日历对象转化为日期对象
        Date date=a.getTime();
        System.out.println(date); //Thu Nov 19 22:22:37 CST 2020
    }
}
